#include "MainFrameBufferGLES.h"
#include "RendererGLES.h"

namespace Nezha
{

	MainFrameBufferGLES::MainFrameBufferGLES(u8 bitDepth, u16 w, u16 h)
	{
		mColorDepth = bitDepth;
		mWidth = w;
		mHeight = h;

		RendererGLES* r = static_cast<RendererGLES*>(Renderer::GetGlobal());
		mAdaptor = r->getAdaptor();
	}

	MainFrameBufferGLES::~MainFrameBufferGLES()
	{

	}

	void MainFrameBufferGLES::_preDraw(Viewport* vp)
	{

	}

	void MainFrameBufferGLES::_postDraw(Viewport* vp)
	{

	}

	void MainFrameBufferGLES::swapBuffers(bool waitVSync /* = true */)
	{
		mAdaptor->swapFrameBuffer(waitVSync);
	}

}//end namespace Nezha